package com.test.random.server.port.poperties;

import com.test.random.server.port.constants.RandomServerPortConstant;
import org.springframework.boot.context.properties.ConfigurationProperties;


/**
 * @ClassName RandomServerPortProperties
 * @Description TODO
 * @Author jhwang
 * @Date 2021/9/12 20:12
 * @Version 1.0.0
 */
@ConfigurationProperties(prefix = "scf.random.server.port")
public class RandomServerPortProperties {
    private Integer maxPort = RandomServerPortConstant.MAX_SERVER_PORT;
    private Integer minPort = RandomServerPortConstant.MIN_SERVER_PORT;
    private String denyPort = RandomServerPortConstant.DENY_SERVER_PORT;
    private Boolean open = RandomServerPortConstant.CONFIG_IS_OPEN;
    private Integer retry = RandomServerPortConstant.RETRY_COUNT;

    public Integer getMaxPort() {
        return maxPort;
    }

    public RandomServerPortProperties setMaxPort(Integer maxPort) {
        this.maxPort = maxPort;
        return this;
    }

    public Integer getMinPort() {
        return minPort;
    }

    public RandomServerPortProperties setMinPort(Integer minPort) {
        this.minPort = minPort;
        return this;
    }

    public String getDenyPort() {
        return denyPort;
    }

    public RandomServerPortProperties setDenyPort(String denyPort) {
        this.denyPort = denyPort;
        return this;
    }

    public Boolean getOpen() {
        return open;
    }

    public RandomServerPortProperties setOpen(Boolean open) {
        this.open = open;
        return this;
    }

    public Integer getRetry() {
        return retry;
    }

    public RandomServerPortProperties setRetry(Integer retry) {
        this.retry = retry;
        return this;
    }
}
